package com.Java.train.business.req;

import com.Java.train.business.entity.DTO.ConfirmOrderTicketDTO;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.*;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;

@Data
@Getter
@Setter
@NoArgsConstructor
public class ConfirmOrderDoReq extends Page {

    @ApiModelProperty("会员id")
    private Long memberId;

    @ApiModelProperty("日期")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @NotNull(message = "[日期]不能为空")
    private Date date;

    @ApiModelProperty("车次编号")
    @NotBlank(message = "[火车车次]不能为空")
    private String trainCode;

    @ApiModelProperty("出发站")
    @NotBlank(message = "[火车始发站]不能为空")
    private String start;

    @ApiModelProperty("到达站")
    @NotBlank(message = "[火车终点站]不能为空")
    private String end;

    @ApiModelProperty("余票ID")
    @NotNull(message = "[余票id]不能为空")
    private Long dailyTrainTicketId;

    @ApiModelProperty("车票")
    @NotEmpty(message = "[火车车票]不能为空")
    private List<ConfirmOrderTicketDTO> tickets;

    @ApiModelProperty("订单状态|枚举[ConfirmOrderStatusEnum]")
    private String status;

    @NotBlank(message = "图形码token不为空")
    private String ImageCodeToken;

    @NotBlank(message = "图形验证码不能为空")
    private String ImageCode;
}
